/*
 * @Description:
 * @Version: 1.0
 * @Autor: gaoluo
 * @Date: 2021-08-20 09:19:16
 * @LastEditors: gaoluo
 * @LastEditTime: 2021-11-19 10:21:40
 * @FilePath: /nhw/src/router/routes.js
 */

// import message from './module/message.js'
import profile from './module/profile.js'
import assignment from './module/assignment.js'
import work from './module/work.js'


const routes = [
  {
    path: '/index.html',
    redirect: '/home/work',
  },
  {
    path: '/',
    redirect: '/home/work',
  },
  {
    path: '*',
    name: '404',
    component: () => import('views/404.vue')
  },
  {
    name: 'Login',
    path: '/login',
    meta: {
      title: '登录',
      level: 0
    },
    component: () => import( /* webpackChunkName: "home" */'views/Login')
  },
  {
    path: '/home',
    redirect: '/home/work',
    meta: {
      title: "首页",
      level: 1
    },
    component: () => import(/* webpackChunkName: "home" */"views/Home"),
    children: [
      {
        name: 'Work',
        path: 'work',
        meta: {
          title: '工作',
          level: 1
        },
        component: () => import(/* webpackChunkName: "home" */'views/Work'),

      },
      {
        name: 'Profile',
        path: 'profile',
        meta: {
          title: '我的',
          level: 1
        },
        component: () => import(/* webpackChunkName: "home" */'views/Profile'),
      },
      {
        name: 'Message',
        path: 'message',
        meta: {
          title: '消息',
          level: 1
        },
        component: () => import(/* webpackChunkName: "home" */'views/Message'),
      },
      {
        name: 'Assignment',
        path: 'assignment',
        meta: {
          title: '任务',
          level: 1
        },
        component: () => import(/* webpackChunkName: "home" */'views/Assignment'),
      },

    ]
  },
  ...profile,
  ...assignment,
  // ...message,
  ...work

]

export default routes